<?php

class m131104_043447_oak extends CDbMigration
{
	public function safeUp()
	{
        $sql = 'CREATE TABLE `{{user}}`
                (
                    `id` bigint PRIMARY KEY,
                    `name` varchar(255),
                    `first_name` varchar(255),
                    `last_name` varchar(255),
                    `birthday` date,
                    `profile_url` varchar(255),
                    `username` varchar(255),
                    `email` varchar(255),
                    `gender_id` tinyint,
                    `hometown_id` bigint,
                    `location_id` bigint,
                    `avatar_id` int,
                    `last_login` datetime,
                    `fb_token` varchar(255),
                    `created_at` datetime,
                    `updated_at` datetime
                )
                ENGINE=InnoDB DEFAULT CHARSET=utf8;';
        
        $this->execute($sql);
	}
    
    public function safeDown()
    {
        return false;
    }
}